<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-table v-loading="loading" :data="list">
        <el-table-column label="申请单号" align="center" prop="appId" />
        <el-table-column label="收款人" align="center" prop="accountName" />
        <el-table-column label="收款账号" align="center" prop="accountNubmer" />
        <el-table-column label="提现金额" align="center" prop="cashOutAmount" />
        <el-table-column label="收款方式" align="center" prop="onlineVersion" />
        <el-table-column
          label="审核状态"
          align="center"
          prop="developmentVersion"
        />
        <el-table-column label="申请时间" align="center" prop="applyTime">
          <template v-slot="scope">
            <span>{{ parseTime(scope.row.applyTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="支付时间"
          align="center"
          prop="createTime"
          width="180"
        >
          <template v-slot="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="操作"
          align="center"
          class-name="small-padding fixed-width"
        >
          <template v-slot="scope">
            <el-button size="mini" type="text" @click="handleDelete(scope.row)"
              >审核</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <!-- 分页组件 -->
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.pageNo"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </el-card>
  </div>
</template>

<script>
import { getAccountRecords, updateAccountRecord } from "@/api/distribute/order";
export default {
  name: "NamesIndex",

  data() {
    return {
      loading: false,
      list: [],
      total: 0,
      dialogVisible: false,
      // 查询参数
      queryParams: {
        pageNo: 1,
        pageSize: 10,
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    // 获取提现列表
    getList() {
      // queryParams
      getAccountRecords(this.queryParams).then((res) => {
        console.log("获取提现记录", res);
        this.list = res.data.list;
      });
    },
    // 审核用户提现
    handleDelete() {
      updateAccountRecord()
        .then((res) => {})
        .catch((err) => {});
    },
  },
};
</script>

<style></style>
